/*
 *    This file is part of acados.
 *
 *    acados is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation; either
 *    version 3 of the License, or (at your option) any later version.
 *
 *    acados is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public
 *    License along with acados; if not, write to the Free Software Foundation,
 *    Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#include "test/test_utils/zeros.h"

#include <cstdlib>

void i_zeros(int_t **pA, int_t row, int_t col) {
    void *temp = malloc((row*col)*sizeof(int_t));
    *pA = (int_t *) temp;
    int_t *A = *pA;
    int_t i;
    for (i = 0; i < row*col; i++) A[i] = 0;
}

void d_zeros(real_t **pA, int_t row, int_t col) {
    void *temp = malloc((row*col)*sizeof(real_t));
    *pA = (real_t *) temp;
    real_t *A = *pA;
    int_t i;
    for (i = 0; i < row*col; i++) A[i] = 0.0;
}
